package cn.com.bluemoon.daps.standard.dto;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.com.bluemoon.daps.standard.entity.DapAuditFieldStandardResult;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 稽核表中字段标准符合结果表(详情)
 * </p>
 *
 * @author admin
 * @since 2020-08-03
 */
@Data
@Accessors
public class AuditFieldStdNoRelationResult implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "表主键id")
    private String id;

    @ApiModelProperty(value = "字段中文名")
    @Excel(name = "字段中文名", orderNum = "5")
    private String fieldChinName;

    @ApiModelProperty(value = "字段长度")
    @Excel(name = "字段长度", orderNum = "7")
    private String fieldLong;

    @ApiModelProperty(value = "字段名称")
    @Excel(name = "采纳的标准", orderNum = "4")
    private String fieldName;

    @ApiModelProperty(value = "字段类型")
    @Excel(name = "字段类型", orderNum = "6")
    private String fieldType;

    @ApiModelProperty(value = "是否存在映射, 0:不存在 1:存在")
    private Integer isMapping;

    @ApiModelProperty(value = "对应模型表的字段id")
    private String fieldId;

    @ApiModelProperty(value = "对应模型表字段id（当前模型最新字段id）")
    private String fieldNewestId;

    @ApiModelProperty(value = "模型名称")
    @TableField(exist = false)
    @Excel(name = "模型名称", orderNum = "1")
    private String modelName;

    @ApiModelProperty(value = "库表名称")
    @TableField(exist = false)
    @Excel(name = "库表名称", orderNum = "2")
    private String tableName;

    @ApiModelProperty(value = "库表中文名")
    @TableField(exist = false)
    @Excel(name = "库表中文名", orderNum = "3")
    private String tableChinName;

    public AuditFieldStdNoRelationResult() {
    }

    public AuditFieldStdNoRelationResult(DapAuditFieldStandardResult result) {
        BeanUtil.copyProperties(result, this);
    }
}
